﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration.Install;
using System.Linq;
using System.IO;
using System.Diagnostics;

namespace RoketPack
{
    [RunInstaller(true)]
    public partial class AppLaunch : Installer
    {
        public AppLaunch()
        {
            InitializeComponent();
        }

        public override void Commit(IDictionary savedState)
        {
            base.Commit(savedState);

            string basepath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "RoketPack");
            string exepath = Path.Combine(basepath, "RoketPack.exe");

            Process proc = new Process();
            proc.StartInfo.FileName = exepath;
            proc.StartInfo.WorkingDirectory = basepath;
            proc.Start();
        }
    }
}
